/*
 * @Author: 18970328563 2726167793@qq.com
 * @Date: 2023-02-25 21:38:37
 * @LastEditors: 18970328563 2726167793@qq.com
 * @LastEditTime: 2023-07-27 21:05:44
 * @FilePath: \vue_demo\src\request\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */

import axios from "axios";

const instance = axios.create({
    baseURL:'/api',
    timeout:'6000',
    headers:{
        "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2OTEwMjk0NTcsImRhdGEiOnsidXNlcm5hbWUiOiJ0ZXN0IiwidXNlcmluZm8iOnsiSWQiOjcsInVzZXJuYW1lIjoidGVzdCIsInBhc3N3b3JkIjoidGVzdCIsInJvbGUiOiJzIiwiZW1haWwiOiIyNTg0NTI2QHFxLmNvbSJ9fSwiaWF0IjoxNjkwNDI0NjU3fQ.kKmeyTV_IK6YQ1715IODIKh2FoNZk99toA72sEI_5gI"
    }
})

instance.interceptors.request.use((config)=>{
    return config;
})

instance.interceptors.response.use((response)=>{
    return response.data;
})

export default instance